package utils

import (
	"crypto/sha256"
	"encoding/hex"
)

//SHA256 sha加密
func SHA256(data *string) *string {
	hash := sha256.New()
	hash.Write([]byte(*data))
	// io.WriteString(hash, data)
	md := hash.Sum(nil)
	mdStr := hex.EncodeToString(md)
	return &mdStr
}
